﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using FurnitureDesign.Core.Models;

namespace FurnitureDesign.EFCore.Controllers.Infrastructure
{
    public class AppDbContext:DbContext
    {
        public AppDbContext (DbContextOptions <AppDbContext >options):base (options)
        {

        }
        public DbSet <Product> products { get; set; }
        public DbSet<ProductType> productTypes { get; set; }
        public DbSet<RealInfo> realInfos { get; set; }
        public DbSet<RealInfoType> realInfoTypes { get; set; }
        public DbSet<User> users { get; set; }
        public DbSet<Designer> designers { get; set; }
        public DbSet<Message> messages { get; set; }
        protected override  void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Seed();
        }
    }
}
